GDK_BUTTON3_MOTION_MASK));
}
-/**
- * gdk_device_grab:
- * @device: a #GdkDevice. To get the device you can use gtk_get_current_event_device()
- * or gdk_event_get_device() if the grab is in reaction to an event. Also, you can use
- * gdk_seat_get_pointer() but only in code that isn’t triggered by a
- * #GdkEvent and there aren’t other means to get a meaningful #GdkDevice to operate on.
- * @surface: the #GdkSurface which will own the grab (the grab surface)
- * @grab_ownership: specifies the grab ownership.
- * @owner_events: if %FALSE then all device events are reported with respect to
- * @surface and are only reported if selected by @event_mask. If
- * %TRUE then pointer events for this application are reported
- * as normal, but pointer events outside this application are
- * reported with respect to @surface and only if selected by
- * @event_mask. In either mode, unreported events are discarded.
- * @event_mask: specifies the event mask, which is used in accordance with
- * @owner_events.
- * @cursor: (allow-none): the cursor to display while the grab is active if the device is
- * a pointer. If this is %NULL then the normal cursors are used for
- * @surface and its descendants, and the cursor for @surface is used
- * elsewhere.
- * @time_: the timestamp of the event which led to this pointer grab. This
- * usually comes from the #GdkEvent struct, though %GDK_CURRENT_TIME
- * can be used if the time isn’t known.
- *
- * Grabs the device so that all events coming from this device are passed to
- * this application until the device is ungrabbed with gdk_device_ungrab(),
- * or the surface becomes unviewable. This overrides any previous grab on the device
- * by this client.
- *
- * Note that @device and @surface need to be on the same display.
- *
- * Device grabs are used for operations which need complete control over the
- * given device events (either pointer or keyboard). For example in GTK+ this
- * is used for Drag and Drop operations, popup menus and such.
- *
- * Note that if the event mask of an X window has selected both button press
- * and button release events, then a button press event will cause an automatic
- * pointer grab until the button is released. X does this automatically since
- * most applications expect to receive button press and release events in pairs.
- * It is equivalent to a pointer grab on the surface with @owner_events set to
- * %TRUE.
- *
- * If you set up anything at the time you take the grab that needs to be
- * cleaned up when the grab ends, you should handle the #GdkEventGrabBroken
- * events that are emitted when the grab ends unvoluntarily.
- *
- * Returns: %GDK_GRAB_SUCCESS if the grab was successful.
- *
- * Deprecated: Use gdk_seat_grab() instead.
- **/
GdkGrabStatus
gdk_device_grab (GdkDevice *device,
GdkSurface *surface,
return res;
}
-/**
- * gdk_device_ungrab:
- * @device: a #GdkDevice
- * @time_: a timestap (e.g. %GDK_CURRENT_TIME).
- *
- * Release any grab on @device.
- *
- * Deprecated: 3.20. Use gdk_seat_ungrab() instead.
- */
void
gdk_device_ungrab (GdkDevice *device,
guint32 time_)
GDK_AVAILABLE_IN_ALL
GdkDeviceType gdk_device_get_device_type (GdkDevice *device);
-GDK_DEPRECATED_FOR(gdk_seat_grab)
-GdkGrabStatus gdk_device_grab (GdkDevice *device,
- GdkSurface *surface,
- GdkGrabOwnership grab_ownership,
- gboolean owner_events,
- GdkEventMask event_mask,
- GdkCursor *cursor,
- guint32 time_);
-
-GDK_DEPRECATED_FOR(gdk_seat_ungrab)
-void gdk_device_ungrab (GdkDevice *device,
- guint32 time_);
-
GDK_AVAILABLE_IN_ALL
GdkSurface *gdk_device_get_last_event_surface (GdkDevice *device);